package com.gioneco.util.esCondition;

import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder;

/**
 * 查询条件处理
 * @author dongjialin
 * @since 2022-06-01
 */
public class Query<K>{

    /**
     * 通过此对象封装ES查询信息
     */
    private EntityEtlBuilder entitySqlBuilder = new EntityEtlBuilder();
    /**
     * 获取高级查询对象
     */
    public NativeSearchQueryBuilder nativeSearchQueryBuilder = null;

    public Criteria criteria;


    public Query(Criteria criteria){
        nativeSearchQueryBuilder = entitySqlBuilder.dslHandler(criteria);
        this.criteria=criteria;
    }

    public static <K> Query<K> query(Criteria criteria){
        return new Query(criteria);
    }

}
